package com.whuan.main;

import com.whuan.conver.ConvertUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

import static com.whuan.conver.ConvertUtil.parseJSON2Map;

//@Slf4j
public class ConvertMain {
    public static void main(String[] args){
//        Map map1 = new HashMap<String,String>();
//        map1.put("name" ,"张三");
//        map1.put("age" ,"25");
//        String s = ConvertUtil.maptoXml(map1);
//        log.info(map1)

        String jsonStr = "{\"bizPackage\":{\"custNum\":\"custnm001\",\"appName\":\"appnam001\",\"timeStamp\":\"20190101\",\"liveDetectCtrlVer\":\"001\",\"authMode\":\"194\"},\"sign\":\"eyJjdXN0TnVtIjoiY3VzdG5tMDAxIiwiYXBwTmFtZSI6ImFwcG5hbTAwMSIsInRpbWVTdGFtcCI6IjIwMTkwMTAxIiwibGl2ZURldGVjdEN0cmxWZXIiOiIwMDEiLCJhdXRoTW9kZSI6IjE5NCJ9\"}";
        Map<String, Object> map = parseJSON2Map(jsonStr);
        Map map1 = new HashMap<String,String>();
        map1.put("text","text");
        map1.putAll(map);
        System.out.println(map);
        System.out.println(map1);
    }
}
